<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: notice.php 11 2013-09-21 11:43:11Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 11 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-21 11:43:11 +0000 (Sat, 21 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

$notice = $db->db_query("SELECT
							notice_id,
							notice_title,
							notice_desc,
							DATE_FORMAT(date_added, '%d.%m.%Y %H:%i Uhr') AS date_added
						FROM
							".TABLE_ADMIN_START_PAGE_NOTICE."
						ORDER BY
							notice_id ASC");
?>
<link href="https://fonts.googleapis.com/css?family=Reenie+Beanie" rel="stylesheet" type="text/css" />
<div class="notice_bg">
	<script type="text/javascript">
		<!--
			function delConfirm(id) {
				if(confirm('Wollen Sie diese Notiz wirklich löschen?')) {
					xajax_delNotice(id);
				} else {
					return false;
				}
			}
		//-->
	</script>
	<table width="100%">
		<tr>
			<td colspan="2" id="notice_zone" align="right">
				<a class="button" href="javascript:void(0)" onclick="xajax_newNotice()">neue Notiz</a>
			</td>
		</tr>
		<?php
		if($notice->_numOfRows > 0) {
			while(!$notice->EOF) {
				echo '<tr class="notice_'.$notice->fields['notice_id'].'">
						<td class="notice_entry">
							<span onmouseOver="TagToTip(\'notice_'.$notice->fields['notice_id'].'\',BGCOLOR, \'#ffffff\')" onmouseout="UnTip()">
								'.$notice->fields['notice_title'].'
							</span>
							<div class="dn" id="notice_'.$notice->fields['notice_id'].'">
								<span class="notice_tooltip">'.(!empty($notice->fields['notice_desc'])?$notice->fields['notice_desc']:'<em class="ac">kein Text</em>').'</span>
							</div>
						</td>';
				echo '	<td class="notice_entry_date" valign="top"><nobr>'.$notice->fields['date_added'].' <a href="javascript:void(0)" onclick="return delConfirm('.$notice->fields['notice_id'].')"><img src="images/icons/bin-metal-full.png" title="Notiz löschen" alt="" /></a></nobr></td></tr>';
				$notice->MoveNext();
			}
		} else
			echo '<tr><td align="center"><em>Derzeit wurden noch keine Notizen hinterlegt.</em></td></tr>';
		?>
	</table>
</div>